<?php if (!defined('THINK_PATH')) exit();?>
<!DOCTYPE html>
<html>


<!-- Mirrored from www.zi-han.net/theme/hplus/form_editors.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:35 GMT -->
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>H+ 后台主题UI框架 - 富文本编辑器</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">

    <link href="/Public/Admin/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="/Public/Admin/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="/Public/Admin/css/animate.min.css" rel="stylesheet">
    <link href="/Public/Admin/css/plugins/summernote/summernote.css" rel="stylesheet">
    <link href="/Public/Admin/css/plugins/summernote/summernote-bs3.css" rel="stylesheet">
    <link href="/Public/Admin/css/style.min862f.css?v=4.1.0" rel="stylesheet">
    <!-- Sweet Alert -->
    <link href="/Public/Admin/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content">

        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>添加配置</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="dropdown-toggle" data-toggle="dropdown" href="form_basic.html#">
                                <i class="fa fa-wrench"></i>
                            </a>
                            <ul class="dropdown-menu dropdown-user">
                                <li><a href="form_basic.html#">选项1</a>
                                </li>
                                <li><a href="form_basic.html#">选项2</a>
                                </li>
                            </ul>
                            <a class="close-link">
                                <i class="fa fa-times"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <form class="form-horizontal m-t" id="signupForm" method="post" action="<?php echo U('Sys_config_add');?>" onsubmit="return content()">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">配置名称：</label>
                                <div class="col-sm-8">
                                    <input id="firstname" name="name" class="form-control" type="text">
                                    <!-- <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 这里写点提示的内容</span> -->
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">类型：</label>
                                <div class="col-sm-8">
                                    <input id="lastname" name="type" class="form-control" type="text" aria-required="true" aria-invalid="false" class="valid">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">备注：</label>
                                <div class="col-sm-8">
                                    <input id="lastname" name="bz" class="form-control" type="text" aria-required="true" aria-invalid="false" class="valid">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">类容1：</label>

                                <div class="ibox-content no-padding">

                                    <div class="summernote">

                                    </div>

                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">类容2：</label>

                                <div class="ibox-content no-padding">

                                    <div class="summernote">

                                    </div>

                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">类容3：</label>

                                <div class="ibox-content no-padding">

                                    <div class="summernote">

                                    </div>

                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-8 col-sm-offset-3">
                                    <button class="btn btn-primary" type="submit">提交</button>
                                </div>
                            </div>
                        </form>
                    </div>
                    

                </div>
            </div>
        </div>
    </div>
    <script src="/Public/Admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/Public/Admin/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="/Public/Admin/js/content.min.js?v=1.0.0"></script>
    <script src="/Public/Admin/js/plugins/summernote/summernote.min.js"></script>
    <script src="/Public/Admin/js/plugins/summernote/summernote-zh-CN.js"></script>
    <script src="/Public/Admin/js/plugins/sweetalert/sweetalert.min.js"></script>
    <script>
        $(document).ready(function(){
            $(".summernote").summernote({lang:"zh-CN",height: 150,airMode: true,codemirror: {theme: 'monokai'},})
        });
        var edit=function(){
            $("#eg").addClass("no-padding");$(".click2edit").summernote({lang:"zh-CN",focus:true})
        };
        var save=function(){
            $("#eg").removeClass("no-padding");var aHTML=$(".click2edit").code();$(".click2edit").destroy()
        };
        function content() {
            var data = new Object(); 
            data["name"] = $("input[name='name']").val();  
            data["type"]  = $("input[name='type']").val();  
            data["value1"] = $('.summernote').eq(0).code();  
            data["value2"] = $('.summernote').eq(1).code();  
            data["value3"] = $('.summernote').eq(2).code();
            data["bz"]    = $("input[name='bz']").val();
            $.ajax({
                type: "POST",
                url: 'Sys_config_add',
                data: {data:data},
                dataType: "json",
                success: function(msg){
                    if(msg.res==200){
                        swal({
                            title: "太帅了",
                            text: "小手一抖就打开了一个框",
                            type: "success"
                        });
                    }else if(msg.res==201){
                        swal({
                            title: "error",
                            text: "对不起，不能重复添加配置信息",
                            type: "error"
                        });
                    }else{
                        swal({
                            title: "error",
                            text: "错误代码400",
                            type: "error"
                        });
                    }
                    console.log(msg);
                }
            })
            return false;
        }
    </script>
    <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
</body>


<!-- Mirrored from www.zi-han.net/theme/hplus/form_editors.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:35 GMT -->
</html>